﻿using System;
using Sharp.Infrastructure.Interfaces;

namespace Sharp.DataTransferObject.CMS
{
    /// <summary>
    /// 快捷登录用的OAuth
    /// </summary>
    public class OAuthDTO : IDTO
    {
        public Guid Id { get; set; }
        /// <summary>
        /// 接口
        /// </summary>
        public OAuthType Interface { get; set; }
        public string AppId { get; set; }
        public string AppKey { get; set; }


        /// <summary>
        /// 第三方登录成功后回传的地址
        /// </summary>
        public string CallbackUrl { get; set; }


        /// <summary>
        /// 是否可用
        /// </summary>
        public bool IsEnable { get; set; }

        public enum OAuthType
        {
            /// <summary>
            /// 未设置
            /// </summary>
            None = 0,
            /// <summary>
            /// QQ
            /// </summary>
            QQ = 1,
            /// <summary>
            /// 微信
            /// </summary>
            Wechat = 2,
            /// <summary>
            /// 微博
            /// </summary>
            Weibo = 3
        }

    }
}
